<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    /* 直角三角形 */

    .triangle {
      border-left: 60px solid transparent;
      border-bottom: 40px solid #999;
      width: 0px;
      margin: 0 auto;
    }

    /* 带边缘色的三角形 */

    /* 通过设置after 和 before 的absoluet 错位的方法 */

    /* filter则设置了阴影 */

    .traiangle_1 {
      width: 300px;
      height: 80px;
      border: 1px solid #ccc;
      position: relative;
      margin: 0 auto;
      filter: drop-shadow(0 0 2px #999);
      background-color: #fff;
    }

    .traiangle_1:before {
      content: '';
      position: absolute;
      left: -10px;
      top: 34px;
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      border-right: 10px solid black;
    }

    .traiangle_1:after {
      content: '';
      position: absolute;
      left: -10px;
      top: 34px;
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      border-right: 10px solid #FFF;
    }
  </style>
</head>

<body>
  <div class="triangle"></div>
  <br>
  <br>
  <br>
  <div class="traiangle_1"></div>
</body>

</html>